#/usr/bin/env python
# --*-- enconding=utf-8 --*--


class Student(object):

    @property
    def score(self):
        return self._score

    @score.setter
    def score(self,score):
        if not isinstance(score,int):
            raise ValueError('score must be integer')
        if score < 0 or score > 100:
            raise ValueError('score must between 0 ~ 100')
        self._score = score


std = Student()
std.score = 100
print std.score
std.score = 101
